import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SWrestleMyInfo } from "../../../../../Message/Public/SWrestleMyInfo";
import { Cache } from "../../../cache/Cache";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class WrestleMyInfoCommand
    
    export  class WrestleMyInfoCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc1=arg1.messageBase as SWrestleMyInfo;
            var loc2=Cache.instance.wrestle.wrestleMyWrestleinfo;
            loc2.winNum = loc1.winNum;
            loc2.loseNum = loc1.loseNum;
            loc2.mark = loc1.mark;
            loc2.battleNum = loc1.dailyNum;
            loc2.rank = loc1.rank;
            loc2.rankCross = loc1.rankCross;
            loc2.dailyNum = loc1.dailyNum;
            loc2.todayNum = loc1.todayNum;
            loc2.isNewCross = loc1.isNewCross;
            NetDispatcher.dispatchCmd(ServerCommand.WrestleMyWrestleInfoUpdate, loc2);
            return;
        }
    }
